﻿/*
This file is under Microsoft Public License (MS-PL)
Copyright Yohann MARTEL.  All rights reserved.
Codeplex: http://amf.codeplex.com
AMF Website: http://www.ymartel.com/aspnet-mobile-framework/
*/
using System.ComponentModel;
using System.Web.UI;

namespace Mobile.WebControls
{
    [ToolboxData("<{0}:IconLinkButton runat=server></{0}:IconLinkButton>")]
    public class IconLinkButton : LinkButton
    {
        #region Properties
        [Category("Appearance")]
        public IconPosition Position { get; set; }

        [Category("Appearance")]
        public DataIcon Icon { get; set; }
        #endregion

        #region Render Methods
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);
            IconLinkHelper.RenderDataIcon(writer,Icon);
            IconLinkHelper.RenderPosition(writer,Position);
        }
        #endregion
    }
}
